# 
# Created with PyCharm.
# Description :
# User: jiume
# Date: 2024-10-16
# Time: 19:43
#

userName = 'yangyaowei'
password = '123456'
i = 3
while i > 0:
    print('请输入账号：',end='')
    user = input()
    print('请输入密码：',end='')
    word = input()
    if user == userName and password == word:
        print('登录成功！')
        break
    else:
        i -= 1
        print('账号或密码错误，',end='')
        if i != 0:
            print('还有',i,'次机会')
else:
    print('登录失败！')
